package com.glela.platform.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.glela.platform.model.CheckCode;

public interface CheckCodeMapper {
	int deleteByPrimaryKey(Integer id);

	int insert(CheckCode record);

	int insertSelective(CheckCode record);

	CheckCode selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(CheckCode record);

	int updateByPrimaryKey(CheckCode record);

	List<CheckCode> selectByMobilePnone(Map<String, Object> map);

	/**
	 * 添加
	 * 
	 * @param userId
	 * @param money
	 * @return
	 */
	public int insertCheckCode(@Param("mobile") String mobile, @Param("code") String code, @Param("type") int type);

	/**
	 * 根据手机号码查询 (按照ID降序排序 limit 1)
	 * @param userId
	 * @param money
	 * @return
	 */
	public CheckCode selectCheckCodeByMobile(String mobile);
}